﻿--HEADER Drop Gross and PnL columns from InvestmentSecuritySerie table
DECLARE @ObjectName NVARCHAR(100)
SELECT @ObjectName = OBJECT_NAME([default_object_id]) FROM SYS.COLUMNS
WHERE [object_id] = OBJECT_ID('[Analytics].[InvestmentSecuritySerie]') AND [name] = 'Gross';
EXEC('ALTER TABLE [Analytics].[InvestmentSecuritySerie] DROP CONSTRAINT ' + @ObjectName);

ALTER TABLE Analytics.InvestmentSecuritySerie
DROP COLUMN Gross;

ALTER TABLE Analytics.InvestmentSecuritySerie
DROP COLUMN PnL;